package com.dyypdadmin.service.impl;
import com.dyypdadmin.dao.ServiceDetailsDao;
import com.dyypdadmin.pojo.ServiceDetails;
import com.dyypdadmin.service.ServiceDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ServiceDetailsServiceImpl implements ServiceDetailsService {

    @Autowired
    private ServiceDetailsDao serviceDetailsDao;

    @Override
    public int addServiceDetails(int serviceTypeId, String serviceName, String servicePrice, String serviceDescription) {
        return serviceDetailsDao.addServiceDetails(serviceTypeId, serviceName, servicePrice, serviceDescription);
    }

    @Override
    public int deleteServiceDetailsById(int service_detail_id) {
        return serviceDetailsDao.deleteServiceDetailsById(service_detail_id);
    }

    @Override
    public int updateServiceDetails(ServiceDetails serviceDetails) {
        return serviceDetailsDao.updateServiceDetails(serviceDetails);
    }

    @Override
    public ServiceDetails getServiceDetailsById(int service_detail_id) {
        return serviceDetailsDao.getServiceDetailsById(service_detail_id);
    }

    @Override
    public List<ServiceDetails> getAll() {
        return serviceDetailsDao.getAll();
    }

    @Override
    public List<ServiceDetails> getByType(int service_type_id) {
        return serviceDetailsDao.getListByType(service_type_id);
    }

    @Override
    public int changeStatus(Integer service_detail_id, Integer is_appointment_available, Integer is_del) {
        return serviceDetailsDao.changeStatus(service_detail_id, is_appointment_available, is_del);
    }

    @Override
    public List<ServiceDetails> getDetailByName(String service_name) {
        return serviceDetailsDao.getDetailByName(service_name);
    }

    @Override
    public int insertServiceDetail(ServiceDetails serviceDetails) {
        return serviceDetailsDao.insertServiceDetail(serviceDetails);
    }


}
